﻿using Direct.IDAL.User.Jurisdiction;
using DirectSell.Common.Filter;
using DirectSell.Common.Session;
using Microsoft.Practices.Unity;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using System.Web;
using System.Web.Mvc;

namespace DirectSell.WebLayer.Areas.User.Controllers.Home
{
    /// <summary>
    /// 首页
    /// </summary>
    public class HomeController : Controller
    {
        #region 注入
        [Dependency]
        protected IModifyInfoRespository modifydal { get; set; }

        [Dependency]
        protected IUserNoticeRepository notice { get; set; }

        #endregion

        #region 会员首页--郭文昊--2018年10月29日09:56:31
        // GET: User/Home
        [LoginFilter(IsCheck =true)]
        public async Task<ActionResult> Index()
        {
            var userinfo = await modifydal.GetInfo(SessionInfo.GetSession().UserCode);

            ViewBag.Notice = await notice.TopNotice();

            return View(userinfo);
        }
        #endregion
    }
}